<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tipask's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset={APP_CHARSET}">
<link media="all" type="text/css" href="css/admin/admincp.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="js/ueditor/themes/default/ueditor.css"/>
</head>
<body>
<script type="text/javascript" src="js/jquery.js" ></script>
<script type="text/javascript" src="js/admin.js" ></script>
<script type="text/javascript" src="js/calendar.js" ></script>
<script type="text/javascript" src="js/ueditor/editor_config.js"></script>
<script type="text/javascript" src="js/ueditor/editor_all_min.js"></script> 
<div id="append">
</div>
<div class="container">
	<div class="note fixwidthdec">
		<p class="i">以下各项务必要填写，活动海报自动会取活动简介的第一张图片。</p>
	</div>
	<div class="mainbox nomargin">
		<form action="index.php?c=admin_event&a=edit&id={$event['id']}" method="post"   onsubmit="return docheck();">
			<table class="opt" width="100%">
				<tr>
					<td>活动主题: <input class="txt" id="title" name="title" value="{$event['title']}" style="width:300px;"></td>
				</tr>
				<tr>
					<td>活动地点:<input class="txt"  id="location" name="location" value="{$event['location']}" style="width:300px;"></td>
				</tr>
				<tr>
					<td>报名时间:<input class="txt"  id="starttime"  name="starttime" value="{$event['format_starttime']}" style="width:150px;"  onclick="showcalendar();"> 截止到&nbsp; <input class="txt"  id="endtime"  name="endtime" value="{$event['format_endtime']}" style="width:150px;"  onclick="showcalendar();"></td>
				</tr>
				<tr>
					<td>每人花销:<input class="txt"  id="cost" name="cost" value="{$event['cost']}" style="width:100px;"></td>
				</tr>
				<tr>
					<td>报名名额:<input class="txt"  id="membernum" name="membernum"  value="{$event['membernum']}"  style="width:300px;"></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>活动简介:<textarea  id="detail" style="height:500px;width:70%;" name="detail">{$event['detail']}</textarea></td>
				</tr>
				<tr>
					<td>
						<input class="btn" type="submit" value=" 提 交 " name="submit">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
<script type="text/javascript">
var editor_a = new baidu.editor.ui.Editor();
editor_a.render( 'detail' );

function docheck(){
	var items=['title','location','starttime','endtime','cost','membernum'];
	var itemtips=['活动主题','活动地点','开始报名时间','截止报名时间','每人花销','报名名额'];
	for(i = 0; i < items.length; i++) {
		element=$('#'+items[i]);
		if(''==element.val()){
			element.focus();
			alert(itemtips[i]+'不能为空！');
			return false;
		}
	} 
	return true;
}
</script>
</body>
</html>
